package com.suneast.suneaststore.modules.homepage.servicemall;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.suneast.suneaststore.R;

import java.util.List;

public class CalendarItemAdapter extends BaseQuickAdapter<Integer, CalendarItemAdapter.VH> {

    public CalendarItemAdapter(int layoutResId, @Nullable List<Integer> data) {
        super(layoutResId, data);
    }

    public CalendarItemAdapter(@Nullable List<Integer> data) {
        super(data);
    }

    public CalendarItemAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(VH helper, Integer item) {
        if (item != -1) {
            helper.setText(R.id.tv_day_number, String.valueOf(item));
        } else {
            helper.itemView.setVisibility(View.INVISIBLE);
        }
    }

    public static class VH extends BaseViewHolder {

        public VH(View view) {
            super(view);
        }
    }
}
